<div class="input-group">
    <span class="input-group-btn input-group-prepend">
		 <span class="btn btn-info">坐标</span>
    </span>
    <input type="text" class="form-control  {{$class}}" id="ma-location-{{$id}}" placeholder="格式：经度,纬度" name="{{$name}}[location]" value="{{$location}}"
           {{$disabled ? 'disabled="disabled"':''}} {{$readonly ? 'readonly="readonly"':''}}>
    <span class="input-group-btn input-group-prepend input-group-append">
		 <span class="btn btn-info">地址</span>
    </span>
    <input type="text" class="form-control {{$class}}" id="map-address-{{$id}}" placeholder="地址，输入地址可检索坐标" name="{{$name}}[address]" value="{{$address}}">
    <span class="input-group-btn input-group-append">
        <button class="btn btn-danger" type="button" id="map-toggle-btn-{{$id}}">地图</button>
    </span>
</div>
<div id="map-container-{{$id}}" style="display: none;"></div>
{{:builder_event_listen($js_hook, function () use($id) {
return <<<HOOK
<script type="text/javascript">
    $(document).ready(function () {
        qqMapInit('map-container-{$id}', 'map-address-{$id}', 'ma-location-{$id}');
    });
    $(document).on('click', '#map-toggle-btn-{$id}', function () {
        $('#map-container-{$id}').toggle(800);
    });
</script>
HOOK;
})}}
